package com.splic.product.mapper;

import java.util.List;
import java.util.Map;

import com.splic.product.domain.Device;
import com.splic.product.domain.User;
import com.splic.product.domain.UserActive;
import com.splic.product.dto.DeviceStatisDto;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

/**
 * 用户活跃Mapper接口
 * 
 * @author singe
 * @date 2022-01-04
 */
public interface UserActiveMapper 
{
    /**
     * 查询用户活跃
     * 
     * @param id 用户活跃主键
     * @return 用户活跃
     */
    public UserActive selectUserActiveById(Long id);

    /**
     * 查询用户活跃列表
     * 
     * @param userActive 用户活跃
     * @return 用户活跃集合
     */
    public List<UserActive> selectUserActiveList(UserActive userActive);

    /**
     * 新增用户活跃
     * 
     * @param userActive 用户活跃
     * @return 结果
     */
    public int insert(UserActive userActive);

    /**
     * 修改用户活跃
     * 
     * @param userActive 用户活跃
     * @return 结果
     */
    public int update(UserActive userActive);

    /**
     * 删除用户活跃
     *
     * @param id 用户活跃主键
     * @return 结果
     */
    public int deleteById(Long id);


    List<DeviceStatisDto> selectActiveStatisPageList(DeviceStatisDto deviceStatisDto);

    List<String> selectActivePhoneBrandList();

    List<String> selectActiveAndroidVersionList(String phoneBrand);

    @MapKey("id")
    List<Map<String, Object>> selectActiveByDevice(@Param("deviceList") List<Device> deviceList);

    @MapKey("id")
    List<Map<String, Object>> selectActiveByUser(@Param("list") List<User> list);
}
